﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MapEntities
{
    public static class GeometryTypeHelper
    {
        public static GeometryType GetGeometryType(string val)
        {
            switch (val.ToUpperInvariant())
            {
                case "POINT": return GeometryType.Point;
                case "LINESTRING": return GeometryType.LineString;
                case "POLYGON": return GeometryType.Polygon;
                case "GEOMETRYCOLLECTION": return GeometryType.GeometryCollection;
                case "MULTIPOINT": return GeometryType.MultiPoint;
                case "MULTILINESTRING": return GeometryType.MultiLineString;
                case "MULTIPOLYGON": return GeometryType.MultiPolygon;
                default: return GeometryType.Unknown;
            }
        }
    }
}
